<?php
namespace app\api\validate;
use think\Validate;

class ShadowOrder extends Validate{
	protected $regex=['price'=>'\d+$|\d+\.{0,1}[0-9]{0,2}$'];
	public $rule=[
	   	'id'=>'require|number',
	   	'addr_id'=>'require|number',
	   	'work_id'=>'require|number',
	   	'setting_id'=>'require|number',
	   	'money'=>'require|regex:price',
   	];
	public $message=[
    	'id.require'=>'id不存在请传id',
    	'addr_id.require'=>'请选择收货地址',
    	'work_id.require'=>'作品Id不存在',
    	'setting_id.require'=>'请选择规格',
    ];
    
   	
    public $scene=[
    	'selectShadowData'=>['id'],
    	'findDetails'=>['id'],
    	'submitGoods'=>['id'],
    	'selectLogisitcs'=>['id'],
    	'pay'=>['id'],
    	'submitOrder'=>['money','addr_id','work_id','setting_id'],
    ]; 
    
}
?>